package com.yyk.yykywd.util;



/**
 * Created by Administrator on 2018/12/26 0026.
 */

public class OnClickFlagUtil {
    private static final int MIN_DELAY_TIME = 500;  // 两次点击间隔不能少于1000ms
    private static long lastClickTime;

    public static boolean isFastClick() {
        boolean flag = true;
        long currentClickTime = System.currentTimeMillis();
        if ((currentClickTime - lastClickTime) >= MIN_DELAY_TIME) {
            flag = false;
//            ToastUtil.showShort(null,"点击过快");
        }
        lastClickTime = currentClickTime;
        return flag;
    }

}
